﻿@using Common;
@using Web.helper;
@using (Ajax.BeginForm("", "", new { }, new AjaxOptions() { HttpMethod = "Post", OnSuccess = "tips(data)", OnBegin = "ValidateLog" }, new { enctype = "multipart/form-data" }))
{
    <div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index:1000">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">新增</h4>
                </div>
                <div class="modal-body">
                    <input type="hidden" name="id" class="form-control" id="id">
                    <ul id="myTab" class="nav nav-tabs">
                        <li class="active"><a href="#home" data-toggle="tab">基本信息</a></li>
                        <li><a href="#detailed" data-toggle="tab">详细描述</a></li>
                        <li><a href="#seo" data-toggle="tab">SEO选项</a></li>
                    </ul>
                    <div id="myTabContent" class="tab-content">
                        <div class="tab-pane fade in active" id="home">
                            <div class="form-group">
                                <label for="txt_departmentname">上级编号</label>
                                @Html.Raw(Html.select_new())
                            </div>
                            <div class="form-group">
                                <label for="txt_departmentname">显示状态</label>
                                <input type="hidden" id="txt_is_lock" name="txt_is_lock" value="√" /> @*用一个隐藏元素保存选中状态*@
                                <div class="rdo">
                                    <input type="radio" name="rdo" class="rdolist" checked="checked" />
                                    <label class="rdobox">
                                        <span class="check-image"></span>
                                        <span class="radiobox-content">显示</span>
                                    </label>
                                    <input type="radio" name="rdo" class="rdolist" />
                                    <label class="rdobox">
                                        <span class="check-image"></span>
                                        <span class="radiobox-content">隐藏</span>
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="txt_parentdepartment">推荐类型</label>
                                <input type="hidden" id="txt_action_type" name="txt_action_type" value="√" /> @*用一个隐藏元素保存选中状态*@
                                <!-- 多选 -->
                                <div class="fuxuan">

                                    <input type="checkbox" name="chk" class="chklist" checked="checked" />
                                    <!--  -->
                                    <label class="chkbox">
                                        <span class="check-image"></span>
                                        <span class="radiobox-content">@EnumBase.RecommendType.置顶.Description()</span>
                                    </label>
                                    <!--  -->
                                    <input type="checkbox" name="chk" class="chklist" />
                                    <!--  -->
                                    <label class="chkbox">
                                        <span class="check-image"></span>
                                        <span class="radiobox-content">@EnumBase.RecommendType.推荐.Description()</span>
                                    </label>
                                    <!--  -->
                                    <input type="checkbox" name="chk" class="chklist" />
                                    <!--  -->
                                    <label class="chkbox">
                                        <span class="check-image"></span>
                                        <span class="radiobox-content">@EnumBase.RecommendType.热门.Description()</span>
                                    </label>
                                    <!--  -->
                                    <input type="checkbox" name="chk" class="chklist" />
                                    <!--  -->
                                    <label class="chkbox">
                                        <span class="check-image"></span>
                                        <span class="radiobox-content">@EnumBase.RecommendType.允许评论.Description()</span>
                                    </label>
                                    <!--  -->
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="txt_departmentname">标题</label>
                                <input type="text" name="txt_title" class="form-control" id="txt_title" placeholder="标题(必填)">
                            </div>
                            <div class="form-group">
                                <label class="font-noraml">封面图片</label>
                                <div class="input-group">
                                    <span class="input-group-addon">上传图片</span>
                                    <input type="file" name="file1" id="fileImage" style="display:none" class="form-control" onchange="previewImage(this)">
                                    <input type="text" id="txt_img_url" name="txt_img_url" class="form-control" placeholder="封面图片" onclick="javascript:openBrowse();">
                                </div>
                                <div id="preview" style="width:120px; height:120px;border:0px;margin:20px 0px 20px 0px;overflow:hidden;">
                                    <img id="imghead" style="border:0px;width:120px; height:120px">
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="txt_parentdepartment">排序</label>
                                <input type="text" name="txt_sort_id" class="form-control" id="txt_sort_id" placeholder="数字越小越靠前">
                            </div>
                            <div class="form-group">
                                <label for="txt_parentdepartment">浏览次数</label>
                                <input type="text" name="txt_click" class="form-control" id="txt_click" placeholder="">
                            </div>
                            <div class="form-group">
                                <label for="txt_parentdepartment">发布时间</label><br />
                                <input placeholder="发布时间" class="laydate-icon form-control layer-date" id="start_time" name="start_time" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
                            </div>
                        </div>
                        <div class="tab-pane fade" id="detailed">
                            <div class="form-group">
                                <label for="txt_departmentname">信息来源</label>
                                <input type="text" name="txt_source" class="form-control" id="txt_source" placeholder="来源">
                            </div>
                            <div class="form-group">
                                <label for="txt_departmentname">文章作者</label>
                                <input type="text" name="txt_author" class="form-control" id="txt_manager" placeholder="作者">
                            </div>
                            <div class="form-group">
                                <label for="txt_parentdepartment">内容摘要</label>
                                <input type="text" name="txt_summary" class="form-control" id="txt_summary">
                            </div>
                            <div class="form-group">
                                <label for="txt_parentdepartment">内容</label>
                                <textarea id="txtContent" name="txtContent" class="editor" style="visibility:hidden;"></textarea>
                            </div>
                        </div>
                        <div class="tab-pane fade" id="seo">
                            <div class="form-group">
                                <label for="txt_parentdepartment">SEO标题</label>
                                <input type="text" name="txt_seo_title" class="form-control" id="txt_seo_title">
                            </div>
                            <div class="form-group">
                                <label for="txt_departmentname">SEO关键字</label>
                                <textarea class="form-control" rows="3" id="txt_seo_keywords" name="txt_seo_keywords"></textarea>
                            </div>
                            <div class="form-group">
                                <label for="txt_parentdepartment">SEO描述</label>
                                <textarea class="form-control" rows="3" id="txt_seo_description" name="txt_seo_description"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
                    <button class="btn btn-primary block full-width m-b" id="btn_submit" onclick="return onck()"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
                </div>
            </div>
        </div>
    </div>
}